package TagsDB;

import org.hibernate.Session;
/***
 * The class save \ update \ delete tuples to\from tagedFiles table in database
 * @author Guy
 *
 */
public class TagedFilesManager 
{
	//members
	private Session session = null;
	/**
	 * Contractor tagedFilesManager
	 * @param session
	 */
	public TagedFilesManager(Session session) 
	{
		if(session == null)
			throw new
			RuntimeException("Invalid session object.");
		this.session = session;
	}
	/**
	 * Save new tuple of tagged file
	 * @param file
	 */
	public void saveTagedFile(TagedFile file)
	{
		session.save(file);
	}
	/**
	 * update an exist tuple of tagged file
	 * @param file
	 */
	public void updateTagedFile(TagedFile file)
	{
		session.update(file);
	}
	/**
	 * delete an exist tuple of tagged file
	 * @param file
	 */
	public void deleteTagedFile(TagedFile file) 
	{
		session.delete(file);
	}
}
